<!--
Copyright Louis Dionne 2013-2016
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
-->
<!-- boost-no-inspect -->
<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Boost.Hana: boost::hana::pair&lt; First, Second &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
// Copyright Louis Dionne 2013-2016
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
MathJax.Hub.Config({
    "HTML-CSS": {
        linebreaks: {
            automatic: true,
            width: "75% container"
        }
    }
});
</script><script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<!-- Additional javascript for drawing charts. -->
<script type="text/javascript" src="highcharts.js"></script>
<script type="text/javascript" src="highcharts-data.js"></script>
<script type="text/javascript" src="highcharts-exporting.js"></script>
<script type="text/javascript" src="chart.js"></script>
<script type="text/javascript" src="hana.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Boost.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Boost.Hana
   &#160;<span id="projectnumber">1.0.2</span>
   </div>
   <div id="projectbrief">Your standard library for metaprogramming</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structboost_1_1hana_1_1pair.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#related">Synopsis of associated functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="structboost_1_1hana_1_1pair-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">boost::hana::pair&lt; First, Second &gt; Struct Template Reference<div class="ingroups"><a class="el" href="group__group-datatypes.html">Data types</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<div class="textblock"><h3>template&lt;typename First, typename Second&gt;<br />
struct boost::hana::pair&lt; First, Second &gt;</h3>

<p>Generic container for two elements. </p>
<p><code><a class="el" href="structboost_1_1hana_1_1pair.html" title="Generic container for two elements. ">hana::pair</a></code> is conceptually the same as <code><a class="el" href="structstd_1_1pair.html" title="Adaptation of std::pair for Hana. ">std::pair</a></code>. However, <code><a class="el" href="structboost_1_1hana_1_1pair.html" title="Generic container for two elements. ">hana::pair</a></code> automatically compresses the storage of empty types, and as a result it does not have the <code>.first</code> and <code>.second</code> members. Instead, one must use the <code><a class="el" href="group__group-Product.html#ga34bbf4281de06dc3540441e8b2bd24f4" title="Returns the first element of a pair.Note that if the Product actually stores the elements it contains...">hana::first</a></code> and <code><a class="el" href="group__group-Product.html#ga7bb979d59ffc3ab862cb7d9dc7730077" title="Returns the second element of a pair.Note that if the Product actually stores the elements it contain...">hana::second</a></code> free functions to access the elements of a pair.</p>
<h2>Modeled concepts </h2>
<ol type="1">
<li><code>Comparable</code><br />
Two pairs <code>(x, y)</code> and `(x', y')<code>are equal if and only if both </code>x == x'<code>and</code>y == y'`. <div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2016</span></div><div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div><div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="equal_8hpp.html">boost/hana/equal.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="not__equal_8hpp.html">boost/hana/not_equal.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div><div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div><div class="line"></div><div class="line"></div><div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) == hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(hana::make_pair(2, <span class="charliteral">&#39;x&#39;</span>) != hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;y&#39;</span>) != hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main() { }</div></div><!-- fragment --></li>
<li><code>Orderable</code><br />
Pairs are ordered as-if they were 2-element tuples, using a lexicographical ordering. <div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2016</span></div><div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div><div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="less_8hpp.html">boost/hana/less.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div><div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div><div class="line"></div><div class="line"></div><div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) &lt; hana::make_pair(1, <span class="charliteral">&#39;y&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) &lt; hana::make_pair(10, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;y&#39;</span>) &lt; hana::make_pair(10, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main() { }</div></div><!-- fragment --></li>
<li><code>Foldable</code><br />
Folding a pair is equivalent to folding a 2-element tuple. In other words: <div class="fragment"><div class="line"><a class="code" href="group__group-Foldable.html#ga38c6b3f6b1cbadb9b8432a05ff16b7d2">fold_left</a>(<a class="code" href="structboost_1_1hana_1_1pair.html#a1bc322b45af2148a413ba45ee8097045">make_pair</a>(x, y), s, f) == f(f(s, x), y)</div><div class="line"><a class="code" href="group__group-Foldable.html#ga77d43badebd59b046cf93598733649b4">fold_right</a>(<a class="code" href="structboost_1_1hana_1_1pair.html#a1bc322b45af2148a413ba45ee8097045">make_pair</a>(x, y), s, f) == f(x, f(y, s))</div></div><!-- fragment --> Example: <div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2016</span></div><div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div><div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="fold__left_8hpp.html">boost/hana/fold_left.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="fold__right_8hpp.html">boost/hana/fold_right.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="minus_8hpp.html">boost/hana/minus.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="plus_8hpp.html">boost/hana/plus.hpp</a>&gt;</span></div><div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div><div class="line"></div><div class="line"></div><div class="line">static_assert(<a class="code" href="group__group-Foldable.html#ga38c6b3f6b1cbadb9b8432a05ff16b7d2">hana::fold_left</a>(hana::make_pair(1, 3), 0, <a class="code" href="group__group-Monoid.html#gaeb5d4a1e967e319712f9e4791948896c">hana::plus</a>) == 4, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(<a class="code" href="group__group-Foldable.html#ga77d43badebd59b046cf93598733649b4">hana::fold_right</a>(hana::make_pair(1, 3), 0, <a class="code" href="group__group-Group.html#ga2020c526324f361a2b990fe8d1b07c20">hana::minus</a>) == -2, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main() { }</div></div><!-- fragment --></li>
<li><code>Product</code><br />
The model of <code>Product</code> is the simplest one possible; the first element of a pair <code>(x, y)</code> is <code>x</code>, and its second element is <code>y</code>. <div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2016</span></div><div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div><div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="first_8hpp.html">boost/hana/first.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="second_8hpp.html">boost/hana/second.hpp</a>&gt;</span></div><div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div><div class="line"></div><div class="line"></div><div class="line">static_assert(<a class="code" href="group__group-Product.html#ga34bbf4281de06dc3540441e8b2bd24f4">hana::first</a>(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>)) == 1, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(<a class="code" href="group__group-Product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">hana::second</a>(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>)) == <span class="charliteral">&#39;x&#39;</span>, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main() { }</div></div><!-- fragment --> </li>
</ol>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
Synopsis of associated functions</h2></td></tr>
<tr class="memitem:aab78903e9982284e82744dec570afa8d"><td class="memTemplParams" colspan="2">template&lt;&gt; </td></tr>
<tr class="memitem:aab78903e9982284e82744dec570afa8d"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#aab78903e9982284e82744dec570afa8d">make&lt; pair_tag &gt;</a></td></tr>
<tr class="memdesc:aab78903e9982284e82744dec570afa8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <code><a class="el" href="structboost_1_1hana_1_1pair.html" title="Generic container for two elements. ">hana::pair</a></code> with the given elements.  <a href="#aab78903e9982284e82744dec570afa8d">More...</a><br /></td></tr>
<tr class="separator:aab78903e9982284e82744dec570afa8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bc322b45af2148a413ba45ee8097045"><td class="memItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a1bc322b45af2148a413ba45ee8097045">make_pair</a> = <a class="el" href="group__group-core.html#ga1d92480f0af1029878e773dafa3e2f60">make</a>&lt;<a class="el" href="structboost_1_1hana_1_1pair__tag.html">pair_tag</a>&gt;</td></tr>
<tr class="memdesc:a1bc322b45af2148a413ba45ee8097045"><td class="mdescLeft">&#160;</td><td class="mdescRight">Alias to <code>make&lt;<a class="el" href="structboost_1_1hana_1_1pair__tag.html" title="Tag representing hana::pair. ">pair_tag</a>&gt;</code>; provided for convenience.  <a href="#a1bc322b45af2148a413ba45ee8097045">More...</a><br /></td></tr>
<tr class="separator:a1bc322b45af2148a413ba45ee8097045"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a27607958295e6da8a0ba602a2db468f1"><td class="memTemplParams" colspan="2"><a class="anchor" id="a27607958295e6da8a0ba602a2db468f1"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:a27607958295e6da8a0ba602a2db468f1"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a27607958295e6da8a0ba602a2db468f1">operator==</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:a27607958295e6da8a0ba602a2db468f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-Comparable.html#gacaf1ebea6b3ab96ac9dcb82f0e64e547" title="Returns a Logical representing whether x is equal to y.The equal function can be called in two differ...">hana::equal</a></code> <br /></td></tr>
<tr class="separator:a27607958295e6da8a0ba602a2db468f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cae3af55edb3eb05bfa184bda633f7d"><td class="memTemplParams" colspan="2"><a class="anchor" id="a0cae3af55edb3eb05bfa184bda633f7d"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:a0cae3af55edb3eb05bfa184bda633f7d"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a0cae3af55edb3eb05bfa184bda633f7d">operator!=</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:a0cae3af55edb3eb05bfa184bda633f7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-Comparable.html#gae33be2e0d5e04f19082f4b7740dfc9cd" title="Returns a Logical representing whether x is not equal to y.The not_equal function can be called in tw...">hana::not_equal</a></code> <br /></td></tr>
<tr class="separator:a0cae3af55edb3eb05bfa184bda633f7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada078dcf9e68b8e9a82b33c75dde8457"><td class="memTemplParams" colspan="2"><a class="anchor" id="ada078dcf9e68b8e9a82b33c75dde8457"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:ada078dcf9e68b8e9a82b33c75dde8457"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#ada078dcf9e68b8e9a82b33c75dde8457">operator&lt;</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:ada078dcf9e68b8e9a82b33c75dde8457"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-Orderable.html#gad510011602bdb14686f1c4ec145301c9" title="Returns a Logical representing whether x is less than y. ">hana::less</a></code> <br /></td></tr>
<tr class="separator:ada078dcf9e68b8e9a82b33c75dde8457"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedd11fddefddbbbb87d3b24c7117528f"><td class="memTemplParams" colspan="2"><a class="anchor" id="aedd11fddefddbbbb87d3b24c7117528f"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:aedd11fddefddbbbb87d3b24c7117528f"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#aedd11fddefddbbbb87d3b24c7117528f">operator&gt;</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:aedd11fddefddbbbb87d3b24c7117528f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-Orderable.html#gaf9a073eafebbe514fb19dff82318f198" title="Returns a Logical representing whether x is greater than y. ">hana::greater</a></code> <br /></td></tr>
<tr class="separator:aedd11fddefddbbbb87d3b24c7117528f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53817979990da799e659b2576799a79a"><td class="memTemplParams" colspan="2"><a class="anchor" id="a53817979990da799e659b2576799a79a"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:a53817979990da799e659b2576799a79a"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a53817979990da799e659b2576799a79a">operator&lt;=</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:a53817979990da799e659b2576799a79a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-Orderable.html#ga9917dd82beb67151bf5657245d37b851" title="Returns a Logical representing whether x is less than or equal to y. ">hana::less_equal</a></code> <br /></td></tr>
<tr class="separator:a53817979990da799e659b2576799a79a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3f0436b623de5208767751e1e9f7e59"><td class="memTemplParams" colspan="2"><a class="anchor" id="aa3f0436b623de5208767751e1e9f7e59"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:aa3f0436b623de5208767751e1e9f7e59"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#aa3f0436b623de5208767751e1e9f7e59">operator&gt;=</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:aa3f0436b623de5208767751e1e9f7e59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-Orderable.html#ga6023631e7d0a01e16dc3fa4221fbd703" title="Returns a Logical representing whether x is greater than or equal to y. ">hana::greater_equal</a></code> <br /></td></tr>
<tr class="separator:aa3f0436b623de5208767751e1e9f7e59"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acb8494edc410c10d824e942341f30719"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acb8494edc410c10d824e942341f30719"></a>
constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#acb8494edc410c10d824e942341f30719">pair</a> ()</td></tr>
<tr class="memdesc:acb8494edc410c10d824e942341f30719"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructs the <code>pair</code>. Only exists when both elements of the pair are default constructible. <br /></td></tr>
<tr class="separator:acb8494edc410c10d824e942341f30719"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad258681a711a7bf24d79e9d13a7a441e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad258681a711a7bf24d79e9d13a7a441e"></a>
constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#ad258681a711a7bf24d79e9d13a7a441e">pair</a> (First const &amp;<a class="el" href="group__group-Product.html#ga34bbf4281de06dc3540441e8b2bd24f4">first</a>, Second const &amp;<a class="el" href="group__group-Product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">second</a>)</td></tr>
<tr class="memdesc:ad258681a711a7bf24d79e9d13a7a441e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize each element of the pair with the corresponding element. Only exists when both elements of the pair are copy-constructible. <br /></td></tr>
<tr class="separator:ad258681a711a7bf24d79e9d13a7a441e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae31a284451c1c0486339c289a7887fe"><td class="memTemplParams" colspan="2"><a class="anchor" id="aae31a284451c1c0486339c289a7887fe"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:aae31a284451c1c0486339c289a7887fe"><td class="memTemplItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#aae31a284451c1c0486339c289a7887fe">pair</a> (T &amp;&amp;t, U &amp;&amp;u)</td></tr>
<tr class="memdesc:aae31a284451c1c0486339c289a7887fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize both elements of the pair by perfect-forwarding the corresponding argument. Only exists when both arguments are implicitly-convertible to the corresponding element of the pair. <br /></td></tr>
<tr class="separator:aae31a284451c1c0486339c289a7887fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad295aada872521bce6e7775795b8318e"><td class="memTemplParams" colspan="2"><a class="anchor" id="ad295aada872521bce6e7775795b8318e"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:ad295aada872521bce6e7775795b8318e"><td class="memTemplItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#ad295aada872521bce6e7775795b8318e">pair</a> (<a class="el" href="structboost_1_1hana_1_1pair.html">pair</a>&lt; T, U &gt; const &amp;other)</td></tr>
<tr class="memdesc:ad295aada872521bce6e7775795b8318e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy-initialize a pair from another pair. Only exists when both elements of the source pair are implicitly convertible to the corresponding element of the constructed pair. <br /></td></tr>
<tr class="separator:ad295aada872521bce6e7775795b8318e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a962bff38110b5c39b1267fc88851198d"><td class="memTemplParams" colspan="2"><a class="anchor" id="a962bff38110b5c39b1267fc88851198d"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:a962bff38110b5c39b1267fc88851198d"><td class="memTemplItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a962bff38110b5c39b1267fc88851198d">pair</a> (<a class="el" href="structboost_1_1hana_1_1pair.html">pair</a>&lt; T, U &gt; &amp;&amp;other)</td></tr>
<tr class="memdesc:a962bff38110b5c39b1267fc88851198d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move-initialize a pair from another pair. Only exists when both elements of the source pair are implicitly convertible to the corresponding element of the constructed pair. <br /></td></tr>
<tr class="separator:a962bff38110b5c39b1267fc88851198d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96ada4b84949f1653de497410af50013"><td class="memTemplParams" colspan="2"><a class="anchor" id="a96ada4b84949f1653de497410af50013"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:a96ada4b84949f1653de497410af50013"><td class="memTemplItemLeft" align="right" valign="top">constexpr <a class="el" href="structboost_1_1hana_1_1pair.html">pair</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a96ada4b84949f1653de497410af50013">operator=</a> (<a class="el" href="structboost_1_1hana_1_1pair.html">pair</a>&lt; T, U &gt; const &amp;other)</td></tr>
<tr class="memdesc:a96ada4b84949f1653de497410af50013"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign a pair to another pair. Only exists when both elements of the destination pair are assignable from the corresponding element in the source pair. <br /></td></tr>
<tr class="separator:a96ada4b84949f1653de497410af50013"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f1a25445fa5380a78bdf524b764e1c7"><td class="memTemplParams" colspan="2"><a class="anchor" id="a3f1a25445fa5380a78bdf524b764e1c7"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:a3f1a25445fa5380a78bdf524b764e1c7"><td class="memTemplItemLeft" align="right" valign="top">constexpr <a class="el" href="structboost_1_1hana_1_1pair.html">pair</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a3f1a25445fa5380a78bdf524b764e1c7">operator=</a> (<a class="el" href="structboost_1_1hana_1_1pair.html">pair</a>&lt; T, U &gt; &amp;&amp;other)</td></tr>
<tr class="memdesc:a3f1a25445fa5380a78bdf524b764e1c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move-assign a pair to another pair. Only exists when both elements of the destination pair are move-assignable from the corresponding element in the source pair. <br /></td></tr>
<tr class="separator:a3f1a25445fa5380a78bdf524b764e1c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Associated functions</h2>
<a class="anchor" id="aab78903e9982284e82744dec570afa8d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename First, typename Second&gt; </div>
<div class="memtemplate">
template&lt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr auto <a class="el" href="group__group-core.html#ga1d92480f0af1029878e773dafa3e2f60">make</a>&lt; <a class="el" href="structboost_1_1hana_1_1pair__tag.html">pair_tag</a> &gt;</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; <a class="code" href="group__group-Product.html#ga34bbf4281de06dc3540441e8b2bd24f4">first</a>, <span class="keyword">auto</span>&amp;&amp; <a class="code" href="group__group-Product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">second</a>)</div><div class="line">        -&gt; hana::pair&lt;std::decay_t&lt;decltype(<a class="code" href="group__group-Product.html#ga34bbf4281de06dc3540441e8b2bd24f4">first</a>)&gt;, std::decay_t&lt;decltype(second)&gt;&gt;</div><div class="line">    {</div><div class="line">        <span class="keywordflow">return</span> {forwarded(<a class="code" href="group__group-Product.html#ga34bbf4281de06dc3540441e8b2bd24f4">first</a>), forwarded(<a class="code" href="group__group-Product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">second</a>)};</div><div class="line">    }</div></div><!-- fragment -->
<p>Creates a <code><a class="el" href="structboost_1_1hana_1_1pair.html" title="Generic container for two elements. ">hana::pair</a></code> with the given elements. </p>
<h2>Example </h2>
<div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2016</span></div><div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div><div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="core_2make_8hpp.html">boost/hana/core/make.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="equal_8hpp.html">boost/hana/equal.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="first_8hpp.html">boost/hana/first.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="second_8hpp.html">boost/hana/second.hpp</a>&gt;</span></div><div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div><div class="line"></div><div class="line"></div><div class="line">static_assert(<a class="code" href="group__group-Product.html#ga34bbf4281de06dc3540441e8b2bd24f4">hana::first</a>(hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>)) == 1, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(<a class="code" href="group__group-Product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">hana::second</a>(hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>)) == <span class="charliteral">&#39;x&#39;</span>, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) == hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main() { }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1bc322b45af2148a413ba45ee8097045"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename First, typename Second&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr auto make_pair = <a class="el" href="group__group-core.html#ga1d92480f0af1029878e773dafa3e2f60">make</a>&lt;<a class="el" href="structboost_1_1hana_1_1pair__tag.html">pair_tag</a>&gt;</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Alias to <code>make&lt;<a class="el" href="structboost_1_1hana_1_1pair__tag.html" title="Tag representing hana::pair. ">pair_tag</a>&gt;</code>; provided for convenience. </p>
<h2>Example </h2>
<div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2016</span></div><div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div><div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="core_2make_8hpp.html">boost/hana/core/make.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="equal_8hpp.html">boost/hana/equal.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="first_8hpp.html">boost/hana/first.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="second_8hpp.html">boost/hana/second.hpp</a>&gt;</span></div><div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div><div class="line"></div><div class="line"></div><div class="line">static_assert(<a class="code" href="group__group-Product.html#ga34bbf4281de06dc3540441e8b2bd24f4">hana::first</a>(hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>)) == 1, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(<a class="code" href="group__group-Product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">hana::second</a>(hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>)) == <span class="charliteral">&#39;x&#39;</span>, <span class="stringliteral">&quot;&quot;</span>);</div><div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) == hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main() { }</div></div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
Copyright Louis Dionne 2013-2016
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
-->
<!-- boost-no-inspect -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceboost.html">boost</a></li><li class="navelem"><a class="el" href="namespaceboost_1_1hana.html">hana</a></li><li class="navelem"><a class="el" href="structboost_1_1hana_1_1pair.html">pair</a></li>
  </ul>
</div>
</body>
</html>
